// 泛型

interface Res<T> {
  code: number
  message: string
  data: T
}

interface Notice {
  content: string
  id: string
}

const notice: Res<Notice> = {
  code: 1000,
  message: '请求成功',
  data: {
    content: '学习ts',
    id: '1',
  },
}

interface House {
  width: number
  height: number
  people: number
}

const house: Res<House[]> = {
  code: 1000,
  message: '我爱学习',
  data: [{ width: 100, height: 100, people: 2 }],
}

export { notice, house }
